﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using DG.DemiLib;
using DG.Tweening;
using HighlightingSystem;

public class EventOperation : MonoBehaviour
{
	public Button btnCameraBackStart;
	public Camera mainCamera;
	public GameObject[] objs;
	private Vector3 currentVelocity;

	protected void Awake()
	{
		objs = GameObject.FindGameObjectsWithTag("Build");
	}
	
	protected void Start()
	{
		btnCameraBackStart.onClick.AddListener(()=>{
			mainCamera.transform.DOMove(new Vector3(1,15,30),2f);
			mainCamera.transform.DORotate(new Vector3(30,180,0),2f);
			
			for (int i = 0; i < objs.Length; i++) {
				objs[i].GetComponent<Highlighter>().tween = false;
			}
			
		});
	}
}
